home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / efs / efs-plan9.el.z / efs-plan9.el
Encoding:
Text File  |  1998-05-21  |  1.7 KB  |  52 lines

  1. ;; -*-Emacs-Lisp-*-
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;;
  4. ;; File:         efs-plan9.el
  5. ;; Release:      $efs release: 1.15 $
  6. ;; Version:      #Revision: 1.1 $
  7. ;; RCS:          
  8. ;; Description:  efs support for the Plan 9 FTP Server
  9. ;; Author:       Sandy Rutherford <sandy@ibm550.sissa.it>
  10. ;; Created:      Sat Jan 22 21:26:06 1994 by sandy on ibm550
  11. ;; Modified:     Sun Nov 27 18:41:05 1994 by sandy on gandalf
  12. ;;
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14.  
  15. ;;; This file is part of efs. See efs.el for copyright
  16. ;;; (it's copylefted) and warrranty (there isn't one) information.
  17.  
  18. ;;; Works for the plan 9 server plan9.att.com. Plan 9 is an
  19. ;;; AT&T operating system that is similar to unix.
  20.  
  21. (provide 'efs-plan9)
  22. (require 'efs)
  23.  
  24. (defconst efs-plan9-version
  25.   (concat (substring "$efs release: 1.15 $" 14 -2)
  26.       "/"
  27.       (substring "#Revision: 1.1 $" 11 -2)))
  28.  
  29. (efs-defun efs-fix-dir-path plan9 (dir-path)
  30.   ;; Convert DIR-PATH from UN*X-ish to Plan 9. Does nothing actually.
  31.   ;; Avoids appending the "." that we do in unix.
  32.   dir-path)
  33.  
  34. (efs-defun efs-allow-child-lookup plan9 (host user dir file)
  35.   ;; Returns t if FILE in directory DIR could possibly be a subdir
  36.   ;; according to its file-name syntax, and therefore a child listing should
  37.   ;; be attempted.
  38.   ;; Relies on the fact that directories can't have extensions in plan9,
  39.   ;; I think.
  40.   (and (not (and (string-equal dir "/") (string-equal file ".")))
  41.        (progn
  42.      ;; Makes sure that this is cached, before cd'ing
  43.      (efs-expand-tilde "~" 'plan9 host user)
  44.      (efs-raw-send-cd host user
  45.               (if (string-equal file ".")
  46.                   (efs-internal-file-name-nondirectory
  47.                    dir)
  48.                 (concat dir file))
  49.               t))))
  50.  
  51. ;;; end of efs-plan9.el
  52.